package com.longdaji.decoration.data.network;

import com.longdaji.decoration.bean.Account;
import com.longdaji.decoration.bean.Balance;
import com.longdaji.decoration.bean.Collection;
import com.longdaji.decoration.bean.CommonResult;
import com.longdaji.decoration.bean.Feedback;
import com.longdaji.decoration.bean.GoodsComment;
import com.longdaji.decoration.bean.MyCities;
import com.longdaji.decoration.bean.MyLogistics;
import com.longdaji.decoration.bean.MyProvinces;
import com.longdaji.decoration.bean.MyUniversities;
import com.longdaji.decoration.bean.OperationResult;
import com.longdaji.decoration.bean.Order;
import com.longdaji.decoration.bean.Orders;
import com.longdaji.decoration.bean.ReceivingAddress;
import com.longdaji.decoration.bean.RefundGoods;
import com.longdaji.decoration.data.bean.AdBean;
import com.longdaji.decoration.data.bean.AddressBean;
import com.longdaji.decoration.data.bean.AssessUrlBean;
import com.longdaji.decoration.data.bean.AvailableMoneyBean;
import com.longdaji.decoration.data.bean.AvailableScoreBean;
import com.longdaji.decoration.data.bean.CaptainCheckBean;
import com.longdaji.decoration.data.bean.CaptainInfoBean;
import com.longdaji.decoration.data.bean.CartBean;
import com.longdaji.decoration.data.bean.GoodsAccountBean;
import com.longdaji.decoration.data.bean.GoodsBean;
import com.longdaji.decoration.data.bean.GoodsCategory;
import com.longdaji.decoration.data.bean.GoodsChosensBean;
import com.longdaji.decoration.data.bean.GoodsCommentBean;
import com.longdaji.decoration.data.bean.GoodsCommentListBean;
import com.longdaji.decoration.data.bean.GoodsDetailImageBean;
import com.longdaji.decoration.data.bean.GoodsImagesBean;
import com.longdaji.decoration.data.bean.GoodsMotifsBean;
import com.longdaji.decoration.data.bean.GoodsSkuBean;
import com.longdaji.decoration.data.bean.InviteCodeBean;
import com.longdaji.decoration.data.bean.LogisticsBean;
import com.longdaji.decoration.data.bean.OrderBean;
import com.longdaji.decoration.data.bean.PakageBean;
import com.longdaji.decoration.data.bean.PayBean;
import com.longdaji.decoration.data.bean.ShareUrlBean;
import com.longdaji.decoration.data.bean.SignInBean;
import com.longdaji.decoration.data.bean.SignInDataBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Flowable;
import okhttp3.RequestBody;
import retrofit2.http.Query;

/**
 * Created by longtao on 2018/1/2.
 */

public interface HttpHelper {
    Flowable<HttpResponse<GoodsCategory>> getGoodsCatergory();

    Flowable<HttpResponse<GoodsBean>> getGoodsList(String cateId, String orderBy, String userId);

    Flowable<HttpResponse<GoodsImagesBean>> getGoodsImages(String goodId);

    Flowable<HttpResponse<CartBean>> getCartList(String userId);

    Flowable<HttpResponse<GoodsSkuBean>> getGoodsDetail(String goodId, String userId);

    Flowable<HttpResponse> deleteFromChart(String userId, String[] idList);

    Flowable<HttpResponse<GoodsAccountBean>> accountFromChart(String userId, List<String> idList);

    Flowable<HttpResponse> collectGoodsList(String userId, List<String> idList);

    Flowable<HttpResponse> getCaptainInfo(String dormitoryId, String dormitoryName);

    Flowable<HttpResponse> modifyCartItemNum(Map<String, String> options);

    Flowable<HttpResponse<GoodsCommentListBean>> getGoodsComments(String goodsId, String userId);

    Flowable<HttpResponse> addGoodsSkuToCart(Map<String, Object> options);

    Flowable<HttpResponse<AddressBean.Address>> getDefaultAddress(String userid);

    Flowable<HttpResponse<AddressBean>> getAddressList(String userid);

    Flowable<HttpResponse<PayBean>> getPayOrderInfo(Map<String, Object> options);

    Flowable<HttpResponse> doRegisterApi(String username, String name, String telephone, String password,
                                         String remark, String sign, String constellation, String genger,
                                         String head_img_location, String registerTime, String campusName,
                                         String dormitoryName, int isGraduate);

    Flowable<HttpResponse> doUsernameVerifyApi(String username, String telephone);

    Flowable<HttpResponse> doTelephoneVerifyApi(String username, String telephone);

    Flowable<HttpResponse<Account>> doPasswordLoginApi(String username, String password, String loginTime);

    Flowable<HttpResponse> doVerificationRequest(String telephone, String code);

    Flowable<HttpResponse> doVerificationResult(String telephone, String code);

    Flowable<HttpResponse> doForgetPasswordApi(String telephone, String password);

    Flowable<HttpResponse<MyProvinces>> doGetProvince();

    Flowable<HttpResponse<MyCities>> doGetCity();

    Flowable<HttpResponse<MyUniversities>> doGetCampus();

    Flowable<HttpResponse> doUpdatePersonalInfoApi(String userid, String username, String name, String remark, String sign,
                                                   String constellation, String gender, String head_img_location, int credits);

    Flowable<HttpResponse> doUpdateAccountApi(String userid, String username, String telephone, String password);

    Flowable<HttpResponse> doUpdateCampusApi(String userid, String campusName, String dormitoryName);

    Flowable<HttpResponse<Account>> doGetUserInfoApi(String userid, String userName);

    Flowable<HttpResponse> doAddReceivingAddressApi(String userid, String contactPerson, String contactTelephone,
                                                    String province, String city, String district, String street,
                                                    String detailAddress, String createTime, String defaultAddress,
                                                    String zipcode, String delFlag);

    Flowable<HttpResponse<ReceivingAddress>> doGetReceivingAddressApi(String userid, String userName);

    Flowable<HttpResponse> doDeleteReceivingAddressApi(String userid, int shippingId);

    Flowable<HttpResponse> doUpdateReceivingAddressApi(String userid, String contactPerson, String contactTelephone,
                                                       String province, String city, String district, String street,
                                                       String detailAddress, String createTime, String defaultAddress,
                                                       int shippingId, String zipcode, String delFlag);

    Flowable<HttpResponse<ReceivingAddress>> doGetDefaultReceivingAddressApi(String userid, String userName);

    Flowable<HttpResponse<Orders>> doGetOrderApi(String userid, String status, String orderNo);

    Flowable<HttpResponse> doGenerateOrderApi(Order order);

    Flowable<HttpResponse<OperationResult>> doCancelOrderApi(String userid, String orderNo);

    Flowable<HttpResponse<CommonResult>> doRefundApi(String userid, String userName);

    Flowable<HttpResponse<CommonResult>> doExchangeApi(String userid, String userName);

    Flowable<HttpResponse> doGetUpTokenApi();

    Flowable<HttpResponse<Collection>> doGetCollectionApi(String userid);

    Flowable<HttpResponse> doDeleteCollectionApi(String idList, String userId);

    Flowable<HttpResponse> doReturnGoodsApi(String userid, String orderNum, int skuId,
                                            int skuNum, long captainId,
                                            double refundMoney, String refundReason,
                                            String refundDesc, String delFlag);


    Flowable<HttpResponse> doReceivingGoodsApi(String userid, String orderNo);


    Flowable<HttpResponse<GoodsDetailImageBean>> getGoodsDetailImage(String goodId);

    Flowable<HttpResponse<GoodsMotifsBean>> getTopicImage();

    Flowable<HttpResponse<GoodsChosensBean>> getChosenImage();

    Flowable<HttpResponse> likeGoodsOrNot(String userId, String commentsId, String isLike);

    Flowable<HttpResponse> disCollectGoodsList(String userId, List<String> idList);

    Flowable<HttpResponse> doGoodsCommentApi(GoodsComment goodsComment);

    Flowable<HttpResponse<MyLogistics>> doSeeLogisticsApi(String orderNo);

//    Flowable<HttpResponse<OrderRefund>> doGetRefundOrderApi(String userid);

    Flowable<HttpResponse> doFeedbackApi(String userId, String connection, String viewContent);

    Flowable<HttpResponse<Feedback>> doGetFeedbackApi(@Query("userId") String userId);

    Flowable<HttpResponse<SignInBean>> signIn(String userId);

    Flowable<HttpResponse<SignInDataBean>> getSignInData(String userId);

    Flowable<HttpResponse<OrderBean>> creatOrder(RequestBody requestBody);

    Flowable<AssessUrlBean> getAssessTypeUrl(String userId, int authType);


    Flowable<HttpResponse> verifyCreditScore(String certNo, String name);

    Flowable<HttpResponse> applyCaptain(String userId, String captainName, String dormitoryId, String telephone);

    Flowable<HttpResponse> setDefaultAddr(String userid, String defaultAddress, long shippingId);

    Flowable<HttpResponse<GoodsCommentBean>> getDefaultComment(String goodsId);

    Flowable<HttpResponse<List<PakageBean>>> getPakagePattern();

    Flowable<HttpResponse<List<LogisticsBean>>> getLogisticsPattern();

    Flowable<HttpResponse<AvailableScoreBean>> getAvailableScore(String userId);

    Flowable<HttpResponse<AvailableMoneyBean>> getAvailableMoney(String userId);

    Flowable<HttpResponse<CaptainCheckBean>> getCaptainApplyStatus(String userId);


    Flowable<HttpResponse<ShareUrlBean>> getShareUrl();

    Flowable<HttpResponse<InviteCodeBean>> verifyInviteCode(String inviteCode);

    Flowable<HttpResponse> countVisitNum(String goodsId, String cateId, String userId, String visitTime);

    Flowable<HttpResponse<Balance>> doGetBalanceDetailApi(String userId, int type, int pageNo, int pageSize);

    Flowable<HttpResponse<List<RefundGoods>>> doGetRefundGoodsApi(String userid);

    Flowable<HttpResponse<List<CaptainInfoBean>>> queryCaptainInfo(String userId);

    Flowable<HttpResponse<AdBean>> getAd();
}
